console.log(222);
let arr:number[]=[0,1,2,3,4,5,6,7]
const addArr=(arr:number[]):number[]=>{
    let newArr:number[]=[]
    arr.forEach((item,index)=>{
        if(newArr.indexOf(item)==0){
            newArr.push(item)
        }
    })
    return newArr
}
console.log(addArr(arr));

interface objType{
    name:string,
    age:number,
    
    }
    
    let obj={
        name:"阿尔托利雅·潘德拉贡",
        age:18,
        index:"12345789"
    }
    //约束类型
    function thisFun(obj:objType){
        console.log(obj,0);
        
    }
    thisFun(obj)